FROM  bewithmeallmylife/mmpose-runtime-cuda-10.2:1.0.0
#FROM  bewithmeallmylife/mmpose-runtime-cuda-11.1.1:1.0.0
USER root
ENV PATH /root/anaconda3/bin:$PATH
SHELL ["conda", "run", "-n", "python3.8", "/bin/bash", "-c"]
ENV LANGUAGE zh_CN:zh

WORKDIR /app/mmpose

ENV FORCE_CUDA="1"
ADD . .


RUN python setup.py install


CMD ["/root/anaconda3/envs/python3.8/bin/python","demo/top_down_webcam_demo_with_mmdet.py"]
#sudo docker build -t='bewithmeallmylife/mmpose-app-cuda-10.2:1.0.0' .
#sudo docker build -t='bewithmeallmylife/mmpose-app-cuda-11.1:1.0.0' .

#Run comman 'xhost local:root' to avoid qt.qpa.screen: QXcbConnection: Could not connect to display :1  error
#xhost local:root
#sudo docker run --net=host  --gpus '"device=0"' --privileged --rm -it -v /dev/video0:/dev/video0 -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -u root bewithmeallmylife/mmpose-app-cuda-10.2:1.0.0
#sudo docker run --net=host  --gpus '"device=0"' --privileged --rm -it -v /dev/video0:/dev/video0 -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -u root bewithmeallmylife/mmpose-app-cuda-11.1:1.0.0
